package cn.edu.hbpu.mapper;

import cn.edu.hbpu.common.page.PageQueryCondition;
import cn.edu.hbpu.pojo.Attend;
import cn.edu.hbpu.pojo.Student;

import java.util.List;

public interface AttendMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Attend record);

    int insertSelective(Attend record);

    Attend selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Attend record);

    int updateByPrimaryKey(Attend record);

    /**
     * 查看当前数据库中的考勤记录
     * @param sno
     * @return
     */
    Attend selectBySno(Long sno);

    /**
     * 查询attend表记录总数
     * @param pageQueryCondition
     * @return
     */
    int selectCountOfAttend(PageQueryCondition pageQueryCondition);

    /**
     * 查询分页考勤数据
     * @param pageQueryCondition
     * @return
     */
    List<Attend> selectAttendceInfo(PageQueryCondition pageQueryCondition);

    List<Attend> selectAttendMorningNull();

    List<Attend> selectAttendEveningNull();

    /**
     * 查询当天没签到的学生学号
     * @return
     */
    List<Student> selectSnoAllNull();

    /**
     * 批量插入attend记录
     * @param list
     */
    void insertBatch(List<Attend> list);
}